 {

        var o = require("../UIManager/UISoundManager.js"), i = {
            "新手场": {
                title: "SS_name1",
                bg: "selectedplank1"
            },
            "平民场": {
                title: "SS_name2",
                bg: "selectedplank2"
            },
            "普通场": {
                title: "SS_name2",
                bg: "selectedplank2"
            },
            "精英场": {
                title: "SS_name4",
                bg: "selectedplank4"
            },
            "土豪场": {
                title: "SS_name5",
                bg: "selectedplank5"
            },
            "富商场": {
                title: "SS_name6",
                bg: "selectedplank6"
            },
            "豪爵场": {
                title: "SS_name6",
                bg: "selectedplank7"
            },
            "至尊场": {
                title: "SS_name8",
                bg: "selectedplank8"
            }
        }, a = {
            "换三张": "SP_HuanSanZhang",
            "换四张": "SP_HuanSiZhang"
        };
        cc.Class({
            extends: cc.Component,
            properties: {
                spBg: {
                    default: null,
                    type: cc.Sprite
                },
                spChangeFlag: {
                    default: null,
                    type: cc.Sprite
                },
                spWinMoney: {
                    default: null,
                    type: cc.Sprite
                },
                spName: {
                    default: null,
                    type: cc.Sprite
                },
                labBaseChip: {
                    default: null,
                    type: cc.Label
                },
                labOnlineNum: {
                    default: null,
                    type: cc.Label
                },
                labEnterRule: {
                    default: null,
                    type: cc.Label
                },
                labDes: {
                    default: null,
                    type: cc.Label
                },
                _roomId: 0,
                _onlineNum: 0,
                _roomName: "",
                _gameTask: "",
                _maxCoin: 0,
                _minCoin: 0,
                _baseChip: 0,
                _nameDesc: "",
                _play_mode: "",
                _roomDex: 0
            },
            onDestroy: function () {
                Global.notificationCenter.offAll(this);
            },
            bindData: function (e, t) {
                null != e ? (this._roomId = e[0] || 0, this._onlineNum = e[1] || 0, this._roomName = e[2] || "",
                    this._gameTask = e[3] || "", this._roomDex = t, e[5] && e[5].max_coin ? (this._maxCoin = e[5].max_coin,
                    this._minCoin = e[5].min_coin, this._baseChip = e[5].base_chip, this._nameDesc = e[5].nameDesc,
                    this._play_mode = e[5].play_mode) : (this._maxCoin = 0, this._minCoin = 0, this._baseChip = 0,
                    this._nameDesc = "", this._play_mode = ""), this.refresh()) : cc.error("SelectItem", "bindData data = null");
            },
            onClick: function () {
                o.playEffect("select"), Global.roomInfoModel.setRoomId(this._roomId), Global.utils.showWaitting();
                var e = this._roomId, t = Global.roomInfoModel.getPlayModel();
                Global.msgHandler.requestQuickStart(t, e);
            },
            doQuickStart: function (e) {
                if ((e = e || Global.roomInfoModel.getRecommendRoomId()) < 0) {
                    cc.error("SelectItem doQuickStart roomId<0");
                    var t = {
                        text: "金币不足，快去分享获取金币吧！",
                        cancelSp: Global.spriteAtlas.getGoInviteSpf(),
                        cancelText: "去邀请",
                        cancelCallback: function () {
                            Global.UIPopupManager.addPopup("PopupPanel/Panel_InviteFri", function (e) {
                            });
                        },
                        closeCallback: function () {
                            console.log("closeCallback");
                        },
                        needConfirmBtn: !1
                    };
                    Global.UIPopupManager.alert(t);
                } else {
                    Global.roomInfoModel.setRoomId(e);
                    var n = Global.roomInfoModel.getPlayModel();
                    Global.msgHandler.requestQuickStart(n, e);
                }
            },
            refresh: function () {
                var e = i[this._roomName].bg;
                cc.log("this._roomName", this._roomName, e), Global.spriteAtlas.setSpriteFrame(this.spBg, "Texture/select", e);
                var t = i[this._roomName].title;
                if (Global.spriteAtlas.setSpriteFrame(this.spName, "Texture/select", t), cc.log("RoomItem_gamerule[this._nameDesc]++++++", this._nameDesc),
                    a[this._nameDesc] ? Global.spriteAtlas.setSpriteFrame(this.spChangeFlag, "Texture/select", a[this._nameDesc]) : this.spChangeFlag.node.active = !1,
                    Global.configCdn) {
                    var n = Global.configCdn.getUISwitchConf(), o = !1;
                    n && n.isMysteriousRedPacketTask && (o = n.isMysteriousRedPacketTask || !1), !this._play_mode || "xueliu" != this._play_mode && "xuezhan" != this._play_mode ? this.spWinMoney.node.active = !1 : 3 != this._roomDex && 5 != this._roomDex || (this.spWinMoney.node.active = o);
                }
                this.labBaseChip.string = this._baseChip + "", this.labOnlineNum.string = this._onlineNum + "";
                var r = Global.utils.exchangeToWan2(this._maxCoin), s = Global.utils.exchangeToWan2(this._minCoin),
                    l = s + "-" + r;
                -1 == this._minCoin ? l = r + "以下" : -1 == this._maxCoin && (l = s + "以上"), this.labEnterRule.string = l,
                    this.labDes.string = this._gameTask;
            },
            start: function () {
            },
            update: function (e) {
            }
        })
    }